import requests
from lxml import etree
url='https://www.yousuu.com/book/141152'
headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'
    }
response=requests.get(url,headers=headers)
response.encoding=response.apparent_encoding
html=response.text
# htmlElement = etree.HTML(html)
# print(type(htmlElement))



def parse_text():
    htmlElement = etree.HTML(html)
    print(etree.tostring(htmlElement,encoding='utf-8').decode('utf-8'))


def parse_file():
    htmlElement=etree.parse(html)
    print(etree.tostring(htmlElement, encoding='utf-8').decode('utf-8'))


if __name__ == '__main__':
    parse_file()